class UserPhoto < ActiveRecord::Base
  UPLOAD_LIMIT = 5.megabytes
  
  has_attachment :content_type => :image,
    :storage => :file_system,
    :max_size => UPLOAD_LIMIT.megabytes,
    :resize_to => '320x200>',
    :thumbnails => {:thumb => '128x128>'},
    :processor => :MiniMagick

  validates_as_attachment
  belongs_to :user
end